package com.test.demo.service.Imp;
/**
 * 王宇serviceIMP层代码
 * */
import com.test.demo.dao.RoleMapper;
import com.test.demo.model.Role;
import com.test.demo.service.RoleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class RoleServiceImp implements RoleService {
    @Autowired
    private RoleMapper roleMapper;

    @Override
    public Role selectByPrimaryKey(Integer rid) {
        return roleMapper.selectByPrimaryKey(rid);
    }

    @Override
    public List<Role> getIsBegin(){
        System.out.println("执行SQL语句");
        return roleMapper.getIsBegin();
    }
    //获取全部角色信息
    @Override
    public List<Role> getAll() {
        return roleMapper.getAll();
    }

    @Override
    public int insertRole(Role rolemodel) {
        return roleMapper.insertRole(rolemodel);
    }

    @Override
    public int delRole(Integer rid) {
        return roleMapper.delRole(rid);
    }

    @Override
    public int updateRole(Role rolemodel) {
        return roleMapper.updateRole(rolemodel);
    }
}